import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    //将第一页作为主页
    path: '/',
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/OneHandSwordView.vue')
    }
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
    }
  },
  {//第一页
    path: '/Osword',
    name: 'Osword',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/OneHandSwordView.vue')
    }
  },
  {//第二页
    path: '/Tsword',
    name: 'Tsword',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/TwoHandSwordView.vue')
    }
  },
  {//第三页
    path: '/Oknife',
    name: 'Oknife',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/OneHandKnifeView.vue')
    }
  },
  {//第四页
    path: '/Tknife',
    name: 'Tknife',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/TwoHandKnifeView.vue')
    }
  },
  
]

const router = new VueRouter({
  routes
})

export default router
